﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using PJ.DBModel.Models;
using System;
using System.Collections.Generic;
using System.Text;

namespace PJ.DBModel.Mappings
{
    public class LogonlogMap : IEntityTypeConfiguration<Logonlog>
    {
        public void Configure(EntityTypeBuilder<Logonlog> builder)
        {
            builder.ToTable("logonlog");

            builder.HasComment("登录日志表");

            builder.Property(e => e.Id).HasComment("主键");

            builder.Property(e => e.Account)
                .HasMaxLength(50)
                .HasComment("账户");

            builder.Property(e => e.CreateTime).HasComment("创建时间");

            builder.Property(e => e.Description)
                .HasMaxLength(200)
                .HasComment("描述");

            builder.Property(e => e.Ipaddress)
                .HasColumnName("IPAddress")
                .HasMaxLength(50)
                .HasComment("IP地址");

            builder.Property(e => e.IpaddressName)
                .HasColumnName("IPAddressName")
                .HasMaxLength(50)
                .HasComment("IP所在城市");

            builder.Property(e => e.LogType)
                .HasMaxLength(50)
                .HasComment("登录类型");

            builder.Property(e => e.RealName)
                .HasMaxLength(50)
                .HasComment("姓名");
        }
    }
}
